#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main() {
	int n = 0;
	scanf("%d", &n);
	double sum = 0;
	int arr[100] = { 0 };
	int str[100] = { 0 };
	arr[0] = 4;
	str[0] = 7;
	for (int i = 1; i < n; i++) {
		arr[i] = str[i-1];
		str[i] = arr[i] + arr[i - 1]; 
		sum += ((double)arr[i] /str[i]);
	}
	sum = sum + (4.0 / 7);
	printf("%d/%d\n", arr[n-1] , str[n-1]);
	printf("%.2lf", sum );
	return 0;
}